<?php
namespace Home\Model;
use Think\Model;
class UnitModel extends Model 
{

	public $tableName = 'unit';

	/*获取入驻商家
	public function number()
	{
		$unitModel     = M($this->tableName);
		$shop_res      = $unitModel->select();
		$num = 0;
		for ($i=0; $i < count($shop_res); $i++) { 
			$num = $shop_res[$i]['now_unit'] + $num;
		}
		return $num;
	}*/
	
	/*获取入驻商家*/
	public function number()
	{
		$userModel     = M('user');
		$user_res      = $userModel->select();
		$num = 0;
		for ($i=0; $i < count($user_res); $i++) { 
			$num = $user_res[$i]['isunit'] + $num;
		}
		return $num;
	}
	
}